<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 梁家源
  Date: 2021/4/19
  Time: 17:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>商品举报管理</title>
    <!-- layUI的核心CSS文件 -->
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/static/layui-v2.5.7/layui/css/layui.css"/>
    <!-- layUI的核心JS文件 -->
    <script src="${pageContext.request.contextPath}/static/layui-v2.5.7/layui/layui.js" type="text/javascript"
            charset="UTF-8"></script>
    <script src="${pageContext.request.contextPath}/static/script/jquery-1.7.2.js" type="text/javascript"
            charset="UTF-8"></script>
</head>
<body>
<fieldset class="layui-elem-field layui-field-title" style="margin: 20px" >
    <legend style="margin-left: 50px;">商品举报管理</legend>
</fieldset>
    <div class="layui-container">
        <div class="layui-row" >
            <table class="layui-table" lay-skin="nob">
                <colgroup>
                    <col width="140px">
                    <col width="120px">
                    <col width="100px">
                    <col width="120px">
                    <col width="410px">
                    <col>
                </colgroup>
                <thead>
                    <tr>
                        <th>商品图片</th>
                        <th>商品名称</th>
                        <th>商品价格</th>
                        <th>用户名称</th>
                        <th>举报原因</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                <c:forEach var="TOGood" items="${TOGoodsList}">
                    <tr>
                        <td>
                            <a href="getSingleGood?gid=${TOGood.togoods.gid}">
                                <c:if test="${TOGood.togoods.gimg_path==null}">
                                    <img src="${pageContext.request.contextPath}/static/images/white1.jpg"
                                         style="width: 100px;height: 100px;">
                                </c:if>
                                <c:if test="${TOGood.togoods.gimg_path!=null}">
                                    <img src="${TOGood.togoods.gimg_path}"
                                         style="width: 100px;height: 100px;">
                                </c:if>
                            </a>
                        </td>
                        <td>
                            <a href="getSingleGood?gid=${TOGood.togoods.gid}">
                                ${TOGood.togoods.gname}
                                <i class="layui-icon">&#xe623;</i>
                            </a>
                        </td>
                        <td>${TOGood.togoods.gprice}</td>
                        <td>
                            <a href="">
                                ${TOGood.touser.uname}
                                <i class="layui-icon">&#xe623;</i>
                            </a>
                        </td>
                        <td>${TOGood.treason}</td>
                        <td>
                            <a href="${pageContext.request.contextPath}/offShelfTOGoods?gid=${TOGood.togoods.gid}">
                                <button type="button" class="layui-btn layui-btn-radius">下架商品</button>
                            </a>&nbsp;
                            <a href="${pageContext.request.contextPath}/ignoreTOGoods?tid=${TOGood.tid}">
                                <button type="button" class="layui-btn layui-btn-radius">无效举报</button>
                            </a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>

    </div>


</body>
</html>
